package com.navinfo.opentsp.platform.computing.analysis.util;

import java.util.Arrays;

/**
 * 驾驶行为分析系统的运行类型
 */
public enum RunningTypeEnum {
    DF(1,"东风"), QQ(2,"青汽"), YQ(3,"一汽"),HS(4,"东风华神");
    private int type;
    private String desc;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    RunningTypeEnum(int type, String desc){
        this.setType(type);
        this.setDesc(desc);
    }

    public static RunningTypeEnum valueOf(int type){
        return Arrays.stream(RunningTypeEnum.values()).filter(e ->e.type == type).findFirst().get();
    }
}
